From: Jasper St. Pierre Date: Thu, 23 Jun 2011 02:03:04 +0000 (-0400) Subject: shellDBus: Add ListExtensions() and GetExtensionInfo() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7972 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=fc59e222d23c6e2e793e30e3c5f57463edbece60;p=gnome-shell.git shellDBus: Add ListExtensions() and GetExtensionInfo() GetExtensionInfo() takes a UUID and returns a JSON object with information about that extension including their metadata, path and current state. ListExtensions() takes no arguments and returns a JSON object mapping UUIDs to the same information objects described above. https://bugzilla.gnome.org/show_bug.cgi?id=654770 --- diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js index c67028740..ee41491c7 100644 --- a/js/ui/shellDBus.js +++ b/js/ui/shellDBus.js @@ -2,6 +2,7 @@ const DBus = imports.dbus; +const ExtensionSystem = imports.ui.extensionSystem; const Main = imports.ui.main; const GnomeShellIface = { @@ -9,7 +10,15 @@ const GnomeShellIface = { methods: [{ name: 'Eval', inSignature: 's', outSignature: 'bs' - } + }, + { name: 'ListExtensions', + inSignature: '', + outSignature: 'a{sa{sv}}' + }, + { name: 'GetExtensionInfo', + inSignature: 's', + outSignature: 'a{sv}' + }, ], signals: [], properties: [{ name: 'OverviewActive', @@ -56,6 +65,14 @@ GnomeShell.prototype = { return [success, returnValue]; }, + ListExtensions: function() { + return ExtensionSystem.extensionMeta; + }, + + GetExtensionInfo: function(uuid) { + return ExtensionSystem.extensionMeta[uuid] || {}; + }, + get OverviewActive() { return Main.overview.visible; },